package com.nuc.bigdata.config.director;

import com.nuc.bigdata.config.builder.Builder;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;

/**
 * @author tianhao.luo
 * @date 2019/12/11 16:54
 */
public class Director {
    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }

    public ApiInfo makeSwaggerApiInfo(String title, String description, String version, String termsOfServiceUrl, Contact contact, String license, String licenseUrl) {
        builder.setTitle(title);
        builder.setDescription(description);
        builder.setVersion(version);
        builder.setTermsOfServiceUrl(termsOfServiceUrl);
        builder.setContact(contact);
        builder.setLicense(license);
        builder.setLicenseUrl(licenseUrl);

        return builder.build();
    }
}
